package HLLibClasses;

import HLCode.HLClassManager;
import HLCode.HLLibClass;
import HLCode.HLObject;
import HLLib.base.HLList;
import HLLib.base.HLVirtualSlider;

public class HLClassVirtualSlider extends HLLibClass {
    public HLClassVirtualSlider(HLClassManager owner) {
        super(owner);
    }

    public HLObject NewObject() {
        return new HLVirtualSlider();
    }

    public void Execute(HLObject self, int index, HLObject args, HLObject resultOwnerObject, int resultIndex) {
        switch (index) {
        case 0: {
            ((HLVirtualSlider) self).Setting(args.GetInt(0), args.GetInt(1), args.GetInt(2), args.GetInt(3), args.GetInt(4), args.GetInt(5), args.GetInt(6), args.GetInt(7), args.GetInt(8), args.GetInt(9), args.GetBoolean(0), args.GetBoolean(1));
            break;
        }
        case 1: {
            ((HLVirtualSlider) self).pointerRefresh((HLList)args.GetObject(0));
            break;
        }
        case 2: {
            ((HLVirtualSlider) self).update();
            break;
        }
        case 3: {
            if (resultOwnerObject == null) {
                ((HLVirtualSlider) self).Change();
            } else {
                resultOwnerObject.SetInt(resultIndex, ((HLVirtualSlider) self).Change());
            }
            break;
        }
        case 4: {
            if (resultOwnerObject == null) {
                ((HLVirtualSlider) self).Pos();
            } else {
                resultOwnerObject.SetInt(resultIndex, ((HLVirtualSlider) self).Pos());
            }
            break;
        }
        case 5: {
            if (resultOwnerObject == null) {
                ((HLVirtualSlider) self).Value();
            } else {
                resultOwnerObject.SetInt(resultIndex, ((HLVirtualSlider) self).Value());
            }
            break;
        }
        }
    }
}
